# 导入所有控制器
from .root_controller import api as root_api
from .user_controller import api as user_api
from .store_controller import api as store_api
from .order_controller import api as order_api
from .investment_controller import api as investment_api
from .profit_controller import api as profit_api
from .hierarchy_controller import api as hierarchy_api
from .product_controller import api as product_api
from .card_consumption_controller import api as card_consumption_api
from .card_package_controller import api as card_package_api

def register_apis(api):
    """注册所有API命名空间"""
    api.add_namespace(root_api)
    api.add_namespace(user_api)
    api.add_namespace(store_api)
    api.add_namespace(order_api)
    api.add_namespace(investment_api)
    api.add_namespace(profit_api)
    api.add_namespace(hierarchy_api)
    api.add_namespace(product_api)  # 新增商品API
    api.add_namespace(card_consumption_api)
    api.add_namespace(card_package_api)